package com.greystripe.sdk;

import android.content.Context;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.view.MotionEvent;
import android.widget.VideoView;
import java.util.ArrayList;
import java.util.Iterator;

final class y extends VideoView
  implements MediaPlayer.OnCompletionListener, MediaPlayer.OnPreparedListener
{
  private ArrayList a;

  public y(Context paramContext)
  {
    super(paramContext);
    setOnCompletionListener(this);
    setOnPreparedListener(this);
  }

  public final void a(x paramx)
  {
    if (this.a == null)
      this.a = new ArrayList();
    this.a.add(paramx);
  }

  public final void b(x paramx)
  {
    if (this.a != null)
      this.a.remove(paramx);
  }

  public final void onCompletion(MediaPlayer paramMediaPlayer)
  {
    if (this.a != null)
    {
      Iterator localIterator = this.a.iterator();
      while (localIterator.hasNext())
        ((x)localIterator.next()).onCompletion();
    }
  }

  public final void onPrepared(MediaPlayer paramMediaPlayer)
  {
    if (this.a != null)
    {
      Iterator localIterator = this.a.iterator();
      while (localIterator.hasNext())
        ((x)localIterator.next()).onPrepared();
    }
  }

  public final boolean onTouchEvent(MotionEvent paramMotionEvent)
  {
    switch (paramMotionEvent.getAction())
    {
    default:
    case 0:
    case 2:
    case 3:
    case 1:
    }
    while (true)
    {
      return super.onTouchEvent(paramMotionEvent);
      if (this.a != null)
      {
        Iterator localIterator4 = this.a.iterator();
        while (localIterator4.hasNext())
          ((x)localIterator4.next()).onTouchStart();
        if (this.a != null)
        {
          Iterator localIterator3 = this.a.iterator();
          while (localIterator3.hasNext())
            ((x)localIterator3.next()).onTouchMove();
          if (this.a != null)
          {
            Iterator localIterator2 = this.a.iterator();
            while (localIterator2.hasNext())
              ((x)localIterator2.next()).onTouchCancel();
            if (this.a != null)
            {
              Iterator localIterator1 = this.a.iterator();
              while (localIterator1.hasNext())
                ((x)localIterator1.next()).onTouchEnd();
            }
          }
        }
      }
    }
  }

  public final void pause()
  {
    super.pause();
    if (this.a != null)
    {
      Iterator localIterator = this.a.iterator();
      while (localIterator.hasNext())
        ((x)localIterator.next()).onPause();
    }
  }

  public final void seekTo(int paramInt)
  {
    super.seekTo(paramInt);
    if (this.a != null)
    {
      Iterator localIterator = this.a.iterator();
      while (localIterator.hasNext())
        ((x)localIterator.next()).onTimeUpdate();
    }
  }

  public final void start()
  {
    super.start();
    if (this.a != null)
    {
      Iterator localIterator = this.a.iterator();
      while (localIterator.hasNext())
        ((x)localIterator.next()).onPlay();
    }
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.greystripe.sdk.y
 * JD-Core Version:    0.6.2
 */